package user;

import book.BookList;
import operation.IOperation;

public abstract class User {
    protected String name;
    protected IOperation[] iOperations;
    public User(String name)  {
        this.name = name;
    }
    //提供抽象方法菜单，供子类重写，发生动态绑定
    public abstract void menu();

    public void doOperations(int pos, BookList bookList) {
        iOperations[pos].work(bookList);
    }
}
